﻿using GameLogic.Objects;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace GameLogic
{
    class Utils
    {
        public static IEnumerable<GameObject> RemoveDead(IEnumerable<GameObject> gameObjects, IEnumerable<GameObject> aliveObjects)
        {
            var born = aliveObjects.Except(gameObjects);
            var notDead = aliveObjects.Intersect(gameObjects);
            return born.Union(notDead);
        }
    }
}
